﻿namespace DafYomiLib
{
    using System.Collections.Generic;
    using System.Linq;

    public class TalmudBavli
    {
        private static readonly TractateDetails[] s_tractatesDetails = new[]
            {
                new TractateDetails(Tractate.Brachot, 64, Page.A),
                new TractateDetails(Tractate.Shabat, 157, Page.B),
                new TractateDetails(Tractate.Eiruvin, 105, Page.A),
                new TractateDetails(Tractate.Psachim, 121, Page.B),
                new TractateDetails(Tractate.Shkalim, 22, Page.B),
                new TractateDetails(Tractate.Yoma, 88, Page.A),
                new TractateDetails(Tractate.Suka, 56, Page.B),
                new TractateDetails(Tractate.Beitza, 40, Page.B),
                new TractateDetails(Tractate.RoshHashana, 35, Page.A),
                new TractateDetails(Tractate.Taaniat, 31, Page.A),
                new TractateDetails(Tractate.Megila, 32, Page.A),
                new TractateDetails(Tractate.MoedKatan, 29, Page.A),
                new TractateDetails(Tractate.Chagiga, 27, Page.A),
                new TractateDetails(Tractate.Yevamot, 122, Page.B),
                new TractateDetails(Tractate.Ktoobot, 112, Page.B),
                new TractateDetails(Tractate.Nedarim, 91, Page.B),
                new TractateDetails(Tractate.Nazir, 66, Page.B),
                new TractateDetails(Tractate.Sota, 49, Page.B),
                new TractateDetails(Tractate.Gitin, 90, Page.B),
                new TractateDetails(Tractate.Kidooshin, 82, Page.B),
                new TractateDetails(Tractate.BabaKama, 119, Page.B),
                new TractateDetails(Tractate.BabaMetziaa, 119, Page.A),
                new TractateDetails(Tractate.BabaBatra, 176, Page.B),
                new TractateDetails(Tractate.Sanhedrin, 113, Page.B),
                new TractateDetails(Tractate.Makot, 24, Page.B),
                new TractateDetails(Tractate.Shvuot, 49, Page.B),
                new TractateDetails(Tractate.AvodaZara, 76, Page.B),
                new TractateDetails(Tractate.Horayot, 14, Page.A),
                new TractateDetails(Tractate.Zvachim, 120, Page.B),
                new TractateDetails(Tractate.Menachot, 110, Page.A),
                new TractateDetails(Tractate.Choolin, 142, Page.A),
                new TractateDetails(Tractate.Bechorot, 61, Page.A),
                new TractateDetails(Tractate.Arachin, 34, Page.A),
                new TractateDetails(Tractate.Tmoora, 34, Page.A),
                new TractateDetails(Tractate.Kritoot, 28, Page.B),
                new TractateDetails(Tractate.Meila, 22, Page.A),
                new TractateDetails(Tractate.Kanim, 22, Page.A, 25, Page.A, true),
                new TractateDetails(Tractate.Tamid, 25, Page.B, 33, Page.B, true),
                new TractateDetails(Tractate.Midot, 34, Page.A, 37, Page.B),
                new TractateDetails(Tractate.Nida, 73, Page.A),
            };

        static TalmudBavli()
        {
            TractatesDetails = new SortedDictionary<Tractate, TractateDetails>(
                s_tractatesDetails.ToDictionary(a => a.Tractate, a => a));
        }

        static public IDictionary<Tractate, TractateDetails> TractatesDetails { get; private set; }
    }
}